package cn.com.utt.common.proto;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.annotation.JSONField;

/**
 * @author chen.bin
 */
public class RfConfig {
	/**
	 * 第几块芯片，目前都为1
	 */
	private int rfIndex;
	/**
	 * 对应g24_wmm_en g5_wmm_en 1=>Enable,0=>Disable
	 */
	private int wmm;
	/**
	 * 对应g24_channel g5_channel
	 */
	private int channel;
	/**
	 * 对应g24_bandwidth g5_bandwidth “0”自动 “1” 20M
	 */
	private int bandwidth;
	/**
	 * 对应g24_bandwidth g5_bandwidth
	 */
	private int rfRate;
	/**
	 * 短前导码 对应short_preamble 1=>Enable,0=>Disable
	 */
	private int preamble;
	/**
	 * 1=>2.4G 2=>5G
	 */
	private int radio;
	/**
	 * 对应 g24_beacon_interval g5_beacon_interval
	 */
	private int beaconInterval;
	/**
	 * 短间隔 对应g24_short_interval g5_short_interval
	 */
	private int shortGI;
	/**
	 * 开关 启用 1 关闭 0
	 */
	private int enable;
	/**
	 * 无线模式，对应g24_standard g5_standard 2,4G 无线模式"1" 仅 11g合 5G 无线模式 "4" 11a/n 混合 "3" 仅 11a "5" 11vht AC/AN/A "6" 11vht AC/AN
	 */
	private int rfMode;
	/**
	 * 无线传输功能，power_mode和power_level的综合，"0"自动 "1"底 "2" 中 "3"高
	 */
	private int txPower;
	/**
	 * VHT 频道带宽 “0”20M/40M “1” 80M
	 */
	private int vChanWidth;
	/**
	 * 漫游阈值
	 */
	private int roamingThreshold;
	/**
	 * 关联阈值，对应g24WmmRelate,g5WmmRelate
	 */
	private int relateThreshold;
	/**
	 * 最大客户端数，对应g24Clients、g5Clients
	 */
	private int clients;

	@JSONField(name = "Rfindex")
	public int getRfIndex() {
		return rfIndex;
	}

	public void setRfIndex(int rfIndex) {
		this.rfIndex = rfIndex;
	}

	@JSONField(name = "Wmm")
	public String getWmm() {
		if (this.wmm==0){
			return "Disable";
		}
		return "Enable";
	}

	public void setWmm(int wmm) {
		this.wmm = wmm;
	}

	@JSONField(name = "Channel")
	public int getChannel() {
		return channel;
	}

	public void setChannel(int channel) {
		this.channel = channel;
	}

	@JSONField(name = "Bandwidth")
	public int getBandwidth() {
		return bandwidth;
	}

	public void setBandwidth(int bandwidth) {
		this.bandwidth = bandwidth;
	}

	@JSONField(name = "Rfrate")
	public int getRfRate() {
		return rfRate;
	}

	public void setRfRate(int rfRate) {
		this.rfRate = rfRate;
	}
	
	@JSONField(name = "Preamble")
	public String getPreamble() {
		if (this.preamble==0){
			return "Disable";
		}
		return "Enable";
	}

	public void setPreamble(int preamble) {
		this.preamble = preamble;
	}

	@JSONField(name = "Radio")
	public int getRadio() {
		return radio;
	}

	public void setRadio(int radio) {
		this.radio = radio;
	}

	@JSONField(name = "Beaconinterval")
	public int getBeaconInterval() {
		return beaconInterval;
	}

	public void setBeaconInterval(int beaconInterval) {
		this.beaconInterval = beaconInterval;
	}

	@JSONField(name = "ShortGI")
	public String getShortGI() {
		if (shortGI==0){
			return "Disable";
		}
		return "Enable";
	}

	public void setShortGI(int shortGI) {
		this.shortGI = shortGI;
	}

	@JSONField(name = "Enable")
	public int getEnable() {
		return enable;
	}

	public void setEnable(int enable) {
		this.enable = enable;
	}
	
	@JSONField(name = "Rfmode")
	public int getRfMode() {
		return rfMode;
	}

	public void setRfMode(int rfMode) {
		this.rfMode = rfMode;
	}

	@JSONField(name = "Txpower")
	public int getTxPower() {
		return txPower;
	}

	public void setTxPower(int txPower) {
		this.txPower = txPower;
	}

	@JSONField(name = "VChanWidth")
	public int getvChanWidth() {
		return vChanWidth;
	}

	public void setvChanWidth(int vChanWidth) {
		this.vChanWidth = vChanWidth;
	}

	@JSONField(name = "RoamingThreshold")
	public int getRoamingThreshold() {
		return roamingThreshold;
	}

	public void setRoamingThreshold(int roamingThreshold) {
		this.roamingThreshold = roamingThreshold;
	}
	
	@JSONField(name = "RelateThreshold")
	public int getRelateThreshold() {
		return relateThreshold;
	}

	public void setRelateThreshold(int relateThreshold) {
		this.relateThreshold = relateThreshold;
	}
    
	@JSONField(name = "Clients")
	public int getClients() {
		return clients;
	}

	public void setClients(int clients) {
		this.clients = clients;
	}

	public static void main(String[] args) {
		RfConfig r = new RfConfig();
		try {
			System.out.println(JSON.toJSONString(r));
		} catch (Exception e) {
			e.printStackTrace();
		}

	}


}
